from django import template

register = template.Library()

def objIndex(value, arg):
        "Use objects as keys in dictionaries"
        return value[int(arg)]

register.filter('objIndex', objIndex)
